"use strict";
const { jsondbService } = require("../service/database/jsondb");

class ConfigController{

    async set(ojb){
        await jsondbService.set(ojb.info);
    }
    async get(key){
        return jsondbService.get(key);
    }

    async getPath(){
        return jsondbService.getPath();
    }
    async getConf(){
        return jsondbService.getConf();
    }
    async clear(){
        await jsondbService.clear();
    }
    async delete(key){
        await jsondbService.delete(key);
        return jsondbService.getAll();
    }

}


ConfigController.toString = () => "[class ConfigController]";
module.exports = ConfigController;